Skip to content

fix: arduino-cli upload failed (version started from 0.19.0 to 0.21.0) #1654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Feb 10, 2022

Error during Upload: Property 'upload.tool.serial' is undefined

Issue present for arduino-cli version started from 0.19.0 to 0.21.0.
See arduino/arduino-cli#1444

/cc @matthijskooijman

Error during Upload: Property 'upload.tool.serial' is undefined

Issue present for arduino-cli version less than 0.21.0
See arduino/arduino-cli#1444

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm fpistm added this to the 2.3.0 milestone Feb 10, 2022
@fpistm fpistm requested a review from ABOSTM February 10, 2022 17:21
@matthijskooijman
Copy link
Contributor

I'm not entirely sure this fix is correct. I have not tested, but AFAUI this will no longer allow changing the upload method using the "menu" entries using older arduino-cli, since you now set a new-style upload tool for the board as a whole, but no (new-style) tool for the menu entries (only old-style tool lines, but those are not converted in 0.21).

IOW, I think you need lines like below (instead of the ones you added now):

Nucleo_144.menu.upload_method.MassStorage.upload.tool.default=massStorageCopy
Nucleo_144.menu.upload_method.swdMethod.upload.tool.default=stm32CubeProg

Also, might be good to mention the full range of affected arduino-cli versions, looks like this problem was introduced in 0.19 with pluggable discovery, it was already working before that.

@fpistm
Copy link
Member Author

fpistm commented Feb 11, 2022

I'm not entirely sure this fix is correct. I have not tested, but AFAUI this will no longer allow changing the upload method using the "menu" entries using older arduino-cli, since you now set a new-style upload tool for the board as a whole, but no (new-style) tool for the menu entries (only old-style tool lines, but those are not converted in 0.21).

In fact with IDE it works but not with the cli.

IOW, I think you need lines like below (instead of the ones you added now):

Nucleo_144.menu.upload_method.MassStorage.upload.tool.default=massStorageCopy
Nucleo_144.menu.upload_method.swdMethod.upload.tool.default=stm32CubeProg

Unfortunately this is not recognized properly. I guess no fix can be provided for this.
So upload will simply not be compatible with arduino-cli version started from 0.19.0 to 0.21.0.

Now I wondering if we could use the pluggable discovery feature....

@fpistm fpistm added abandoned No more work on this invalid This doesn't seem right labels Feb 11, 2022
@fpistm fpistm closed this Feb 11, 2022
@fpistm fpistm changed the title fix: arduino-cli upload failed fix: arduino-cli upload failed (version started from 0.19.0 to 0.21.0) Feb 11, 2022
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this pull request Jul 21, 2022
This reverts partially commit a4e4377.

Currently, defining a default upload tools prevents flashing
with arduino-cli as default methods is always used even if new
one is passed as fqbn parameters.

See:
stm32duino#1654
arduino/arduino-cli#1444

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this pull request Jul 21, 2022
new version 1.2.1 raised an error about default upload method.
But it could not be fixed easily as Arduino seems not manage
submenu level for upload method.

See:
    stm32duino#1654
    arduino/arduino-cli#1444

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this pull request Jul 21, 2022
new version 1.2.1 raised an error about default upload method.
But it could not be fixed easily as Arduino seems not manage
submenu level for upload method.

See:
    stm32duino#1654
    arduino/arduino-cli#1444

Signed-off-by: Frederic Pillon <[email protected]>
cparata pushed a commit to cparata/Arduino_Core_STM32 that referenced this pull request Jan 31, 2023
This reverts partially commit a4e4377.

Currently, defining a default upload tools prevents flashing
with arduino-cli as default methods is always used even if new
one is passed as fqbn parameters.

See:
stm32duino#1654
arduino/arduino-cli#1444

Signed-off-by: Frederic Pillon <[email protected]>
cparata pushed a commit to cparata/Arduino_Core_STM32 that referenced this pull request Jan 31, 2023
new version 1.2.1 raised an error about default upload method.
But it could not be fixed easily as Arduino seems not manage
submenu level for upload method.

See:
    stm32duino#1654
    arduino/arduino-cli#1444

Signed-off-by: Frederic Pillon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned No more work on this arduino compatibility fix 🩹 Bug fix invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants